<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>欢迎页面-X-admin2.0</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport"
		  content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
	<link rel="shortcut icon" href="__STATIC__/favicon.ico" type="image/x-icon"/>
	<link rel="stylesheet" href="__STATIC__/css/font.css">
	<link rel="stylesheet" href="__STATIC__/css/xadmin.css">
	<script type="text/javascript" src="__STATIC__/js/jquery2.0.js"></script>
	<script type="text/javascript" src="__STATIC__/lib/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="__STATIC__/js/xadmin.js"></script>
</head>

<body>

<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
	<ul class="layui-tab-title">
		<li class="layui-this">微信URL配置</li>
	</ul>
	<div class="layui-tab-content">
		<div class="layui-tab-item layui-show">
			<form class="layui-form" id="form1">
				<div class="layui-form-item">
					<label  class="layui-form-label">
						<span class="x-red">*</span>url路径
					</label>
					<div class="layui-input-inline">
						<input type="text"  name="wx_title"
							   autocomplete="off" class="layui-input" value="{$url}/admin/Wechat/weixinURL?yanzheng={$wx_original_id}">
					</div>
				</div>
				<div class="layui-form-item">
					<label  class="layui-form-label">
						<span class="x-red">*</span>token
					</label>
					<div class="layui-input-inline">
						<input type="text"  name="wx_number"
							   autocomplete="off" class="layui-input" value="{$token}">
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
	layui.use(['form','upload', 'layer'], function () {
		$ = layui.jquery;
		var form = layui.form
				,upload = layui.upload
				, layer = layui.layer;

		//监听提交
		form.on('submit(add)', function (data) {
			//
			$.post('{:url("wechat/wechat")}',data.field,function (res) {
				if (res==true){
					layer.msg("保存成功！", {icon: 6,time:1000}, function () {
						window.location.reload();
					});
				}else {
					layer.msg("保存失败！", {icon: 5,time:1000});
				}
			});
			return false;
		});
	});
</script>
</body>
</html>
